package org.jeecg.modules.erp.base.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.AutoRecordLog;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @Description: 物料配方
 * @Author: jeecg-boot
 * @Date: 2024-05-22
 * @Version: V1.0
 */
@Data
@TableName("erp_goods_formula")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "erp_goods_formula对象", description = "物料配方")
@AutoRecordLog(value = 1)
public class ErpGoodsFormula implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private String createBy;
    /**
     * 创建日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
    /**
     * 更新人
     */
    @ApiModelProperty(value = "更新人")
    private String updateBy;
    /**
     * 更新日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;
    /**
     * 所属部门
     */
    @ApiModelProperty(value = "所属部门")
    private String sysOrgCode;
    /**
     * 配方编码
     */
    @Excel(name = "配方编码", width = 15)
    @ApiModelProperty(value = "配方编码")
    private String code;
    /**
     * 配方号
     */
    @Excel(name = "配方号", width = 15)
    @ApiModelProperty(value = "配方号")
    private String no;
    /**
     * 配方名称
     */
    @Excel(name = "配方名称", width = 15)
    @ApiModelProperty(value = "配方名称")
    private String name;
    /**
     * 配方类别
     */
    @Excel(name = "配方类别", width = 15, dicCode = "pf_category")
    @Dict(dicCode = "pf_category")
    @ApiModelProperty(value = "配方类别")
    private String category;
    /**
     * 配方类型
     */
    @Excel(name = "配方类型", width = 15, dicCode = "pf_type")
    @Dict(dicCode = "pf_type")
    @ApiModelProperty(value = "配方类型")
    private String type;
    /**
     * 年
     */
    @Excel(name = "年", width = 15)
    @ApiModelProperty(value = "年")
    private String year;

    @TableField(exist = false)
    private List<ErpGoodsFormulaDetail> detailList;
}
